package practice;

import java.util.Scanner;

public class GCD_LCM {
    public static void main(String[] args) {
        GCDLCM();
    }
    public static void GCDLCM() {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int gcd = gcd(a,b);
        int lcm = lcm(a,b,gcd);
        System.out.println("gcd is :" + gcd + " " + "lcm is :" + lcm);
    }
    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }
    public static int lcm(int a, int b, int gcd) {
        return (a / gcd) * b;
    }
}
